package model.vo

import java.sql.Timestamp

import model.exceptions.ErrorCode
import model.exceptions.ErrorCode.ErrorCode
import play.api.libs.json.{JsValue, Json, OWrites}

case class StandardSuccessResponse(response: JsValue,
                                   errorCode: ErrorCode = ErrorCode.SUCCESS,
                                   responseTime: Option[Timestamp] = None,
                                   duringTime: Option[Long] = None)

object StandardSuccessResponse {
  implicit def writes: OWrites[StandardSuccessResponse] =
    Json.writes[StandardSuccessResponse]
}
